import Vue from 'vue'
import App from './App'
import'./assets/common.css'
import './assets/base.css'
import './assets/result.css'
import api from './util/api' //引入api
import axios from 'axios'
import VueAxios from 'vue-axios'
import VueJsonp from 'vue-jsonp'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import echarts from 'echarts'
import 'babel-polyfill' //兼容ie

Vue.use(ElementUI) //Vue.property.$message.属性 
Vue.use(VueJsonp)
Vue.use(VueAxios, axios)
//不是基于Vue的插件，如果想绑定到Vue上面
Vue.prototype.$echarts = echarts //将echarts注册成Vue的全局属性
Vue.prototype.$axios = axios
axios.defaults.baseURL = api.baseURL
//在跨域的时候，允许访问服务器带上cookies
axios.defaults.withCredentials = true
Vue.config.productionTip = false  //设置为 false 以阻止 vue 在启动时生成生产提示。

import router from "./router/index.js"
import {store} from "./store/store.js";
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,  //使用store
  components: { App },
  template: '<App/>'
})
